package com.ruoyi.web.group.training.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;

import com.ruoyi.web.group.training.entyiy.TrainingSession;
import com.ruoyi.web.group.training.mapper.TrainingSessionMapper;
import com.ruoyi.web.group.training.service.TrainingSessionService;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class TrainingSessionServiceImpl 
    extends ServiceImpl<TrainingSessionMapper, TrainingSession>
    implements TrainingSessionService {

    @Override
    public List<TrainingSession> listByPlayerId(Integer playerId) {
        return this.lambdaQuery()
                .eq(TrainingSession::getPlayersId, playerId)
                .list();
    }
}